x86 shadow: Audit tables and guest walk when we know they are consistent.
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 28 Feb 2008 13:40:30 +0000 (13:40 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 28 Feb 2008 13:40:30 +0000 (13:40 +0000)
From: Gianluca Guida <gianluca.guida@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/mm/shadow/multi.c

index 2c717123d119089ba1ba26b549a9060a930d3e12..de1d923701fae118b903bbc65b697ca9e08ad016 100644 (file)
@@ -2952,8 +2952,6 @@ static int sh_page_fault(struct vcpu *v,
 #endif /* (SHADOW_OPTIMIZATIONS & SHOPT_VIRTUAL_TLB) */
 
     shadow_lock(d);
-    shadow_audit_tables(v);
-    sh_audit_gw(v, &gw);
 
     if ( gw_remove_write_accesses(v, va, &gw) )
     {
@@ -2972,6 +2970,9 @@ static int sh_page_fault(struct vcpu *v,
         return EXCRET_fault_fixed;
     }
 
+    shadow_audit_tables(v);
+    sh_audit_gw(v, &gw);
+
     /* Make sure there is enough free shadow memory to build a chain of
      * shadow tables. (We never allocate a top-level shadow on this path,
      * only a 32b l1, pae l1, or 64b l3+2+1. Note that while